home *** CD-ROM | disk | FTP | other *** search
/ Die Ultimative Software-P…i Collection 1996 & 1997 / Die Ultimative Software-Pakete CD-ROM fur Atari Collection 1996 & 1997.iso / i / internet / software / inetcust / netcrt0.s < prev    next >
Encoding:
Text File  |  1992-02-27  |  4.1 KB  |  218 lines

  1.         .EXPORT _BasPag
  2.         .EXPORT _app
  3.         .EXPORT errno
  4.         .EXPORT _AtExitVec, _FilSysVec
  5.         .EXPORT _RedirTab
  6.         .EXPORT _StkLim
  7.         .EXPORT _PgmSize
  8.  
  9.         .EXPORT __text, __data, __bss
  10.         .EXPORT inetcust,cookiejar,Start
  11.  
  12. *>>>>>> Import references <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  13.  
  14.         .IMPORT main
  15.         .IMPORT _StkSize
  16.  
  17. *>>>>>> Data structures <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  18.  
  19. MAXUSERNAME    =    16
  20. MAXNAME        =    64
  21. MAXHOSTNAME    =    16
  22.  
  23.         .OFFSET 0
  24.  
  25. TpaStart:
  26.         .DS.L   1
  27. TpaEnd:
  28.         .DS.L   1
  29. TextSegStart:
  30.         .DS.L   1
  31. TextSegSize:
  32.         .DS.L   1
  33. DataSegStart:
  34.         .DS.L   1
  35. DataSegSize:
  36.         .DS.L   1
  37. BssSegStart:
  38.         .DS.L   1
  39. BssSegSize:
  40.         .DS.L   1
  41. DtaPtr:
  42.         .DS.L   1
  43. PntPrcPtr:
  44.         .DS.L   1
  45. Reserved0:
  46.         .DS.L   1
  47. EnvStrPtr:
  48.         .DS.L   1
  49. Reserved1:
  50.         .DS.B   7
  51. CurDrv:
  52.         .DS.B   1
  53. Reserved2:
  54.         .DS.L   18
  55. CmdLine:
  56.         .DS.B   128
  57. BasePageSize:
  58.         .DS     0
  59.  
  60.         data
  61. __data:
  62. * Global error variable
  63.  
  64. errno:
  65.         .DC.W   0
  66.  
  67.  
  68. * Vector for atexit
  69.  
  70. _AtExitVec:
  71.         .DC.L   0
  72.  
  73.  
  74. * Vector for file system deinitialization
  75.  
  76. _FilSysVec:
  77.         .DC.L   0
  78.  
  79.  
  80.         bss
  81. __bss:
  82. * Pointer to base page
  83.  
  84. _BasPag:
  85.         .DS.L   1
  86.  
  87.  
  88. * Applikation flag
  89.  
  90. _app:
  91.         .DS.W   1
  92.  
  93.  
  94. * Stack limit
  95.  
  96. _StkLim:
  97.         .DS.L   1
  98.  
  99. * Program size
  100.  
  101. _PgmSize:
  102.         .DS.L   1
  103.  
  104. * Redirection address table
  105.  
  106. _RedirTab:
  107.         .DS.L   6
  108.  
  109.  
  110.  
  111. *>>>>>>> Code segment <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  112.  
  113.         text
  114. __text:
  115.  
  116.  
  117. ******** TcStart ********************************************************
  118.  
  119. Start:
  120.         BRA.B   Start_0
  121.  
  122.  
  123.  
  124. ******* Configuration data
  125.  
  126. * Redirection array pointer
  127.  
  128.         .DC.L   _RedirTab
  129.  
  130.  
  131. * Stack size entry
  132.  
  133.         .DC.L   _StkSize
  134. Start_0:
  135.         JMP        Start0
  136.  
  137. inetcust:
  138. magic:        .DC.L    cookiejar-inetcust
  139. haddr:        .DS.B    6            * my hardware adress
  140. inaddr:        .DS.L    1            * my internet adress
  141. subnetbits:    .DS.W    1            * number of subnet bits     */
  142. tcpwnd:        .DS.W    1            * default tcp window size   */
  143. tcplowater:    .DS.W    1
  144. netmem:        .DS.L    1
  145. username:    .DS.B    MAXUSERNAME
  146. hosts:        .DS.B    64            * path to hosttable         */
  147. passwd:        .DS.B    64            * path to passwordfile     */
  148. gmtoffs:    .DS.W    1            * time zone offset          */
  149. tzname:        .DS.B    6            * timezone name             */
  150. timeserver:    .DS.L    2            * ip adr of 2 timeservers   */ 
  151. nameserver:    .DS.L    3            * ip adr of 3 nameservers   */
  152. gateway:    .DS.L    1            * ip adr of gateway         */
  153. hostname:    .DS.B    MAXHOSTNAME    * name of this host */
  154. domainname:    .DS.B    MAXNAME        * domainname of this host */
  155. mailhost:    .DS.B    MAXNAME        * mailhost name */
  156. loginhost:    .DS.B    MAXNAME        * default host to login */
  157. printhost:    .DS.B    MAXNAME        * printserver */
  158. printdev:    .DS.B    MAXHOSTNAME    * printer device */
  159.  
  160.  
  161. cookiejar:    .DC.L    0            * 11 cookies room for jar
  162.             .DC.L    0
  163.             .DS.L    20
  164.  
  165.  
  166.         .EVEN
  167.  
  168. Start0:
  169.  
  170.         MOVE.L  A0, A3
  171.         MOVE.L  A3, D0
  172.         MOVE.L  4(A7), A3   ; BasePagePointer from Stack
  173.  
  174.  
  175.         MOVE.L  TextSegSize(A3),A0
  176.         ADD.L   DataSegSize(A3),A0
  177.         ADD.L   BssSegSize(A3),A0
  178.         ADD.W   #BasePageSize,A0
  179.  
  180.         MOVE.L  A3,D0
  181.         ADD.L    A0,D0
  182.         AND.B   #$FC,D0
  183.         MOVE.L  D0,A7
  184.  
  185.         MOVE.L  A0,-(A7)
  186.         MOVE.L  A3,-(A7)
  187.         MOVE.W  #0,-(A7)
  188.         MOVE.W  #74,-(A7)
  189.         TRAP    #1
  190.         LEA.L   12(A7),A7
  191.  
  192. *   <D0.W> = Command line argument count (argc)
  193. *   <A0.L> = Pointer to command line argument pointer array (argv)
  194. *   <A1.L> = Pointer to tos environment string (env)
  195.  
  196.         MOVEQ    #1, D0
  197.         JSR     main
  198.  
  199. ******** exit ***********************************************************
  200. *
  201. * Terminate program
  202. *
  203. * Entry parameters:
  204. *   <D0.W> = Termination status : Integer
  205. * Return parameters:
  206. *   Never returns
  207.  
  208. * Program termination with return code
  209.  
  210.         MOVE.W    #0,-(A7)
  211.         MOVE.L    D0,-(A7)
  212.         MOVE.W  #49,-(A7)
  213.         TRAP    #1
  214.  
  215. ******* Module end *****************************************************
  216.  
  217.         .END
  218.